学C++的时候出了问题~`

来源:百度知道 编辑:UC知道 时间:2024/06/04 02:17:37
刚刚接触C++按教程上的跟着做了个小程序
但是总是出错代码如下:
#include <Windows.h>
#include <stdio.h>

LRESULT CALLBACK WinsunProc(
HWND hwnd, // handle to window
UINT uMsg, // message identifier
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);

int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // command line
int nCmdShow // show state
)
{
WNDCLASS wndcls;
wndcls.cbClsExtra=0;
wndcls.cbWndExtra=0;
wndcls.hbrBackground =(HBRUSH)GetStockObject(BLACK_BRUSH);
wndcls.hCursor =(NULL,IDC_CROSS);
wndcls.hIcon =(NULL,IDI_ERROR);
wndcls.hInstance=hinstance;
wndcls.lpfnWndProc =WinSunProc;
wndcls.lpszClassName="panlong";
wndcls.lpszMenuName =NULL;
wndcls.style

#include <windows.h>
#include <stdio.h>

LRESULT CALLBACK WinSunProc( //大小写
HWND hwnd, // handle to window
UINT uMsg, // message identifier
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);

int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // command line
int nCmdShow // show state
)
{
WNDCLASS wndcls;
wndcls.cbClsExtra=0;
wndcls.cbWndExtra=0;
wndcls.hbrBackground =(HBRUSH)GetStockObject(BLACK_BRUSH);
wndcls.hCursor =LoadCursor(NULL,IDC_CROSS); // 这里修改成加LoadCursor
wndcls.hIcon =LoadIcon(NULL,IDI_ERROR);//这里加LoadIcon
wndcls.hInstance=hInstance; //这里改成hInstance
wndcls.lpfnWndProc =WinSunProc;
wndcls.lpszClassName="panlong";
wndcls.lpszMenuName =NULL;
wndcls.style =CS_HREDRAW|CS